home *** CD-ROM | disk | FTP | other *** search
- /*
- * EOT_Ripple.ifx
- * Written by Thomas Krehbiel
- *
- * Simple wave distort effect.
- *
- * Inputs:
- * Word(Arg(1),1) = Frame number (1 - N)
- * Word(Arg(1),2) = Main filename ("-" if not specified)
- * Word(Arg(1),3) = Swap filename ("-" if not specified)
- * Word(Arg(1),4) = Sequence number (?)
- * Word(Arg(1),5) = Total number of frames (N)
- *
- * Returns:
- * 0 if successful, non-zero on failure
- *
- */
-
- OPTIONS RESULTS
-
- framenum = Word(Arg(1),1)
- mainname = Word(Arg(1),2)
- swapname = Word(Arg(1),3)
- seqnum = Word(Arg(1),4)
- framemax = Word(Arg(1),5)
-
- base = 'Autofx_Ripple_'
-
- x1 = GETCLIP(base||'x1')
- y1 = GETCLIP(base||'y1')
- size = GETCLIP(base||'size')
- ampl = GETCLIP(base||'ampl')
-
- GetMain
- IF rc ~= 0 THEN EXIT rc
- PARSE VAR result name width height .
-
- IF x1 = -1 THEN x1 = width%2
- IF y1 = -1 THEN y1 = height%2
-
- /* linear interpolation */
- a = 360 * (framenum-1) / (framemax-1)
-
- Hook Wave Amplitude ampl Length size Angle a CenterX x1 CenterY y1 AntiAlias
- EXIT rc
-